<div id="headerPage">
    <span>Cursos</span>
</div>
<form method="POST" action="">
    <label>Nome:</label>
    <input type="text" name="CampoBusca" value=""/>
    <input type="submit" value="Buscar" name="busca"/>
    <input type="button" value="Voltar" name="busca" onclick="javascript:location='index.php'"/>
    
</form>

<table id="table" style="margin-top:30px; width:350px" align="center" class="table">
    <thead align="left">
        <tr>
            <th width="170">Nome</th>
            <th align="center">Disciplinas</th>
            <th></th>
        </tr>
     </thead>
     <tbody align="left">
    <?php 
    
    if (isset($cursos[0])){
	    $i = 0;
	    foreach($cursos as $curso){
    
	    $bgcolor = ($i % 2) == 0 ? '#ffffff' : '#e0e0e0';    
	    
	    echo "<tr bgcolor={$bgcolor}>
	              <td style=padding-left:5px>{$curso->nome_curso}</td>	              
	
	              <td align=center ><a class=open-linkMat title='{$curso->id_curso}-curso' href='index.php?modulo=cursos&page=visualizar&key={$curso->id_curso}'>
	                                     <img src='app.misc/images/ico_produtos.png'></a></td>
	              <td align=center ><a class='open-link-delete' title='Excluir solicitação' href='index.php?modulo=cursos&page=gerenciar&delete-key={$curso->id_curso}'>
	                                     <img src='app.misc/images/ico_delete.png'></a></td>";  
	                
	     echo "</tr>";
	    $i = $i+1;
	    }
    }else{
    	echo "<tr bgcolor='#FFFFFF'>
    	<td align='center' colspan = 9 >Nenhuma curso encontrado.</td>
    	</tr>";
    }

    ?>
    
     </tbody>
</table>

<div width="380" id="janela-dialogMat" class="ui-draggable">
    <table width="340" class="table">
        <thead>
            <tr>
                <th width="40">Código</th>
                <th width="350">Nome</th>
            </tr>
        </thead>
        <tbody id="tableBody">
            
        </tbody>
        
    </table>
</div>

<div id="janela-delete">
        <form id="form-delete" class="form" name="frm" method="post" action="">
            <fieldset>
                 Deseja deletar este curso?
            </fieldset>
        </form> 
</div>